<template>
  <div style="background-image: linear-gradient(#f4f4ff,#b6d3ff);height: 950px">
    <el-carousel :interval="4000" type="card" height="300px" style="opacity: 0.5">
      <el-carousel-item v-for="(img, index) in imgArrag" :key="index">
        <a href="#">
          <div>
            <img :src="img" alt="" width="100%" />
          </div>
        </a>
        <router-view></router-view>
      </el-carousel-item>
    </el-carousel>
    <el-input placeholder="questionnaire/#/99647" v-model="input1" style="width: 800px;margin-left:500px" disabled>
      <template slot="prepend">Http://</template>
      <template slot="append">.com</template>
    </el-input>
    <el-button class="button" type="success" style="margin-left: 100px" plain @click="selectCopy()">复制<i
      class="el-icon-upload el-icon--right"></i></el-button>
  </div>

<!--      <el-tag class="tag" type="warning" effect="plain">发布网址</el-tag>-->
<!--     <el-input   placeholder="请输入内容" v-model="input1" style="width: 800px;margin-left:100px">
      <template slot="prepend">Http://</template>
      <template slot="append">.com</template>
    </el-input>
    <el-button class="button" type="success" plain @click="selectCopy()">复制<i class="el-icon-upload el-icon&#45;&#45;right"></i></el-button>-->
<!--   <img :alt="item" src="../assets/what.jpg" width="100%" height="500px" style="margin-top: 5px"/>-->

</template>
<script>
export default {
  name: 'postQuestion',
  data () {
    return {
      input1: '',
      imgArrag: [
        require('../assets/sky1.jpg'),
        require('../assets/sky3.jpg'),
        require('../assets/sky4.jpg'),
        require('../assets/sky5.jpg'),
        require('../assets/sky2.png'),
        require('../assets/sky6.jpg')
      ]

    }
  },
  methods:{
    selectCopy(){
      navigator.clipboard.writeText('https://questionnaire/#/99647'+this.input1+'.com').then(()=>{
        this.$message.success('复制成功');
      })
    }
  }
}


</script>
<style scoped>
.el-carousel__item h3 {
  color: #4761a6;
  font-size: 14px;
  opacity: 0.75;
  line-height: 200px;
  margin: 0;
}

.el-carousel__item:nth-child(2n) {
  background-color: #99a9bf;
}

.el-carousel__item:nth-child(2n + 1) {
  background-color: #d3dce6;
}

.el-select .el-input {
  width: 130px;
}

.input-with-select .el-input-group__prepend {
  background-color: #fff;
}

.el-carousel__item:nth-child(2n) {
  background-color: #99a9bf;
}

.el-carousel__item:nth-child(2n+1) {
  background-color: #d3dce6;
}

.put{
  margin-left: -5px;
}
.button{
  margin-left: 700px;
  margin-top: 50px;
}
.background_style{
  width:100%;
  height:120%;
  position:fixed; top:60px; left:200px;right:0; width:100%;
  background-size:100% 100%;
  background-repeat: no-repeat;
}

.tag{
  margin-left: 200px;
}
</style>
